<template>
  <el-form-item
    :label="labelName"
    class="common-form-width vip-box"
  >
   <slot name="form-item-radio"></slot>
   <slot>
    <el-input
     v-if="noneInput"
      v-model.trim="modelValue"
      :placeholder="`请输入`"
    ></el-input>
   </slot>
    <slot name="form-item-price">
    </slot>

  </el-form-item>
</template>

<script lang="ts" setup>
const props = withDefaults(
  defineProps<{
    modelValue: string;
    labelName: string;
    noneInput: boolean;
    // isRequire: boolean;
  }>(),
  {
    modelValue: '',
    labelName: '',
    noneInput: false,
    // isRequire: false
  }
);
const { labelName } = toRefs(props)
const emits = defineEmits(["update:model-value"]);
const modelValue = computed({
  set(newValue) {
    emits("update:model-value", newValue);
  },
  get() {
    return props.modelValue;
  },
});

</script>

<style scoped lang="scss">
@use "@/components/goodsCenter/styles/common.scss";
.vip-box {
    .el-input {
        width: 120px;
        margin-left: 10px;
    }
    .el-form-item__content {
        display: flex;
        align-items: center;
    }
    .text {
        margin: 0 10px 0 5px;
    }
}
</style>
